
#pragma once
#include "ly/layout.hpp"
#include "ly/manager.hpp"
namespace ly {
class Library : public Object {
 public:
  typedef std::shared_ptr<Library> sptr;
  typedef std::shared_ptr<Layout> layout_sptr;
  typedef std::shared_ptr<Library> library_sptr;
  typedef std::shared_ptr<Cell> cell_sptr;

 public:
  Library() {};

  ~Library() {};

  template <typename... Args>
  static library_sptr create(Args&&... args) {
    return std::make_shared<Library>(std::forward<Args>(args)...);
  }

  layout_sptr layout() {
    if (!m_layout)
      m_layout = Layout::create();
    return m_layout;
  };

 private:
  library_sptr this_sptr() { return std::dynamic_pointer_cast<Library>(shared_from_this()); }

 private:
  layout_sptr m_layout;
};
}  // namespace ly
